home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Demos / PEGASYS II Demo / Macros / DefineArea < prev    next >
Encoding:
Text File  |  1988-08-04  |  1.1 KB  |  36 lines

  1. {------------------------ DEFAREA ------------------------
  2.  
  3. {User enters name of desired area and picks the boundary
  4. {that is on drawing, Note user must pick the edge of the
  5. {boundary desired. Boundary may be pick with any function
  6. {mouse, space bar or locate function.
  7. PROMPT Prompt=`Enter Name of Area` Var=#Name Type=String
  8. PROMPT Prompt=`Pick Area Boundary` Var=#P1     Type=Coor
  9.  
  10. {System measure area of boundary.
  11. AA,P,Silent [A,#P1.x,#P1.y,B|;]
  12. #S=Str(%AA.A + .05)  {Sys Rnds Num to Nearest 1/10, Conv to Char String
  13. #N=Find(#S `.`) + 1     {Finding Dec Pnt + 1 to locate 1/10 position
  14. #A=Subn(#S 1 #N)     {Makes a Substring of #S From 1 position to #N
  15. #A=cat(#A ` sq ft`)      {Adds the 'sq ft' to the Substring
  16.  
  17. {Sys Adds the Area to the Drawing
  18. Tx CC .1 Cl=200 La=200 Pe=0 Ang=0 Pla=Pts Ty=S At=2 \
  19.      [A,#P1.x,#P1.y -1.5|;]
  20. #A
  21.  
  22. {Sys Adds Area Name to the Drawing
  23. Tx CC .1 Cl=200 La=200 Pe=0 Ang=0 Pla=Pts Ty=S At=1 \
  24.     [A,#P1.x,#P1.y|;]
  25. #Name
  26.  
  27. {Sys Groups Text Together With a Tag Name
  28. GP Tag=Space Class=200 [A,#P1.x,#P1.y|-|-|;]
  29.  
  30. {User Moves Text to Desired Location
  31. Message St=`Place Text in Desired Location` Time=3
  32. MV [-]
  33.  
  34. RETURN
  35.  
  36.